package heliotrope.net.loader
{
	import flash.display.BitmapData;
	import flash.events.EventDispatcher;
	import heliotrope.global.ErrorHandler;
	public class BitmapTarget implements ILoadTarget
	{
		protected var _bitmapData:BitmapData;
		public function BitmapTarget()
		{
			super();
		}
		
		public function get bitmapData():BitmapData
		{
			return _bitmapData;
		}
		
		public function saveData(data_:Object):void
		{
			CONFIG::debug
			{
				try
				{
					if(!(data_ is BitmapData)) throw new ArgumentError("Wrong data type to save");
					_bitmapData = data_ as BitmapData;
				} 
				catch(error:ArgumentError) 
				{
					ErrorHandler.handle(error);
				}
			}
			
		}
	}
}